<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>
<title>Calendar Management</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-list.css"
	type="text/css">
<body bgcolor="white">
<f:view>
	<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
	<h:form id="listForm">
		<table align="center" width="100%">
			<tr>
				<td><h:panelGrid columns="2" rowClasses="table-text-3"
					style="width:100%;">
					<h:panelGroup>
						<h:outputText value="#{msg.common_year}:" />
						<h:inputText id="i_year" value="#{calendar.i_year}" />

						<h:outputText value="    " />

						<h:outputText value="#{msg.common_month}:" />
						<h:inputText id="i_month" value="#{calendar.i_month}" />
					</h:panelGroup>

					<h:panelGroup style="text-align:right">
						<h:commandButton id="cmdSubmit" value="#{msg.common_summit}"
							action="#{calendar.search}" styleClass="button-normal" />

						<h:outputText value="    " />
						<h:commandButton id="cmdCancel" type="reset" value="#{msg.common_cancel}"
							styleClass="button-normal" />
					</h:panelGroup>
				</h:panelGrid></td>
			</tr>
			<tr>
				<td>
				<hr>
				</td>
			</tr>
			<tr>
				<td class="content-message"><h:messages /></td>
			</tr>
			<tr>
				<td><h:dataTable id="table"
					value="#{calendar.currentMonthCalendar}" styleClass="listing-table"
					var="the" rowClasses="table-text-calendar"
					headerClass="column-head">

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_sun}" />
						</f:facet>
						<h:commandLink action="#{calendar.openSunday}">
							<h:outputText value="#{the.sunday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_mon}" />
						</f:facet>
						<h:commandLink action="#{calendar.openMonday}">
							<h:outputText value="#{the.monday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_tue}" />
						</f:facet>
						<h:commandLink action="#{calendar.openTuesday}">
							<h:outputText value="#{the.tuesday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_wed}" />
						</f:facet>
						<h:commandLink action="#{calendar.openWednesday}">
							<h:outputText value="#{the.wednesday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_thu}" />
						</f:facet>
						<h:commandLink action="#{calendar.openThursday}">
							<h:outputText value="#{the.thursday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_fri}" />
						</f:facet>
						<h:commandLink action="#{calendar.openFriday}">
							<h:outputText value="#{the.friday.day}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.calendar_sat}" />
						</f:facet>
						<h:commandLink action="#{calendar.openSaturday}">
							<h:outputText value="#{the.saturday.day}" />
						</h:commandLink>
					</h:column>

				</h:dataTable></td>
			</tr>
		</table>
	</h:form>
</f:view>
</body>
</html>
